﻿///////////////////////////////////////////////////////////////
// This is generated code. If you modify this code, be aware
// of the fact that when you re-generate the code, your changes
// are lost. If you want to keep your changes, make this file read-only
// when you have finished your changes, however it is recommended that
// you inherit from this class to extend the functionality of this generated
// class or you modify / extend the templates used to generate this code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 1.0.2005.1
// Code is generated on: October 21, 2008 12:02:15 AM
// Code is generated using templates: C# template set for SqlServer (1.0.2005.1)
// Templates vendor: Solutions Design.
// Templates version: 1.0.2005.1.111705
//////////////////////////////////////////////////////////////
using System;
using System.Data;
using Ultimate.DAL;
using Ultimate.DAL.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace Ultimate.DAL.FactoryClasses
{
	/// <summary>
	/// Generates IEntityFields instances for different kind of Entities. 
	/// This class is generated. Do not modify.
	/// </summary>
	public partial class EntityFieldsFactory
	{
		/// <summary>
		/// Private CTor, no instantiation possible.
		/// </summary>
		private EntityFieldsFactory()
		{
		}


		/// <summary>General factory entrance method which will return an EntityFields object with the format generated by the factory specified</summary>
		/// <param name="relatedEntityType">The type of entity the fields are for</param>
		/// <returns>The IEntityFields instance requested</returns>
		public static IEntityFields CreateEntityFieldsObject(EntityType relatedEntityType)
		{
			IEntityFields fieldsToReturn=null;
			switch(relatedEntityType)
			{
				case Ultimate.DAL.EntityType.Aspnet_UsersEntity:
					fieldsToReturn = CreateAspnet_UsersEntityFields();
					break;
				case Ultimate.DAL.EntityType.Cs_UsersEntity:
					fieldsToReturn = CreateCs_UsersEntityFields();
					break;
				case Ultimate.DAL.EntityType.FieldEntity:
					fieldsToReturn = CreateFieldEntityFields();
					break;
				case Ultimate.DAL.EntityType.GameEntity:
					fieldsToReturn = CreateGameEntityFields();
					break;
				case Ultimate.DAL.EntityType.LeagueEntity:
					fieldsToReturn = CreateLeagueEntityFields();
					break;
				case Ultimate.DAL.EntityType.LocationEntity:
					fieldsToReturn = CreateLocationEntityFields();
					break;
				case Ultimate.DAL.EntityType.PlayerEntity:
					fieldsToReturn = CreatePlayerEntityFields();
					break;
				case Ultimate.DAL.EntityType.RoleEntity:
					fieldsToReturn = CreateRoleEntityFields();
					break;
				case Ultimate.DAL.EntityType.TeamEntity:
					fieldsToReturn = CreateTeamEntityFields();
					break;
				case Ultimate.DAL.EntityType.TeamPlayerEntity:
					fieldsToReturn = CreateTeamPlayerEntityFields();
					break;
			}
			return fieldsToReturn;
		}
		
		/// <summary>General method which will return an array of IEntityFieldCore objects, used by the InheritanceInfoProvider. Only the fields defined in the entity are returned, no inherited fields.</summary>
		/// <param name="entityName">the name of the entity to get the fields for. Example: "CustomerEntity"</param>
		/// <returns>array of IEntityFieldCore fields, defined in the entity with the name specified</returns>
		internal static IEntityFieldCore[] CreateFields(string entityName)
		{
			IEntityFieldCore[] toReturn = null;
			switch(entityName)
			{
				default:
					break;
			}
			return toReturn;
		}


		/// <summary>Creates a complete EntityFields instance for the Aspnet_UsersEntity.</summary>
		private static IEntityFields CreateAspnet_UsersEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)Aspnet_UsersFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)Aspnet_UsersFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((Aspnet_UsersFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the Cs_UsersEntity.</summary>
		private static IEntityFields CreateCs_UsersEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)Cs_UsersFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)Cs_UsersFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((Cs_UsersFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the FieldEntity.</summary>
		private static IEntityFields CreateFieldEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)FieldFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)FieldFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((FieldFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the GameEntity.</summary>
		private static IEntityFields CreateGameEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)GameFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)GameFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((GameFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the LeagueEntity.</summary>
		private static IEntityFields CreateLeagueEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)LeagueFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)LeagueFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((LeagueFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the LocationEntity.</summary>
		private static IEntityFields CreateLocationEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)LocationFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)LocationFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((LocationFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the PlayerEntity.</summary>
		private static IEntityFields CreatePlayerEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)PlayerFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)PlayerFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((PlayerFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the RoleEntity.</summary>
		private static IEntityFields CreateRoleEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)RoleFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)RoleFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((RoleFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the TeamEntity.</summary>
		private static IEntityFields CreateTeamEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)TeamFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)TeamFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((TeamFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the TeamPlayerEntity.</summary>
		private static IEntityFields CreateTeamPlayerEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)TeamPlayerFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)TeamPlayerFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((TeamPlayerFieldIndex)i);
			}
			return fieldsToReturn;
		}
	


		#region Included Code

		#endregion
	}
}
